import Vue from 'vue'
import VueRouter from 'vue-router'
import MusicList from '@/views/MusicList.vue'
import MusicPlay from '@/views/MusicPlay.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: MusicList,
    meta: {
      title: '音乐列表'
    }
  },
  {
    path: '/play',
    component: MusicPlay,
    meta: {
      // 通过路由配制传参给页面
      title: '音乐播放'
    }
  }
]

const router = new VueRouter({
  mode: 'history',
  routes
})

export default router
